/**
 * Unescape unicode char sequences
 */
export function unescapeUnicode(str: string): string {
  str = (str || '').toString()
  return str.replace(/\\u[\da-f]{4}/g, function (ch) {
    const code = parseInt(ch.slice(2), 16)
    return String.fromCharCode(code)
  })
}
